<template>
	<view>
		<!--  -->
		<view class="status_bar" :style="{color:color,background:background}">
			<!-- 这里是状态栏 -->
			<!-- 官方文档: https://uniapp.dcloud.io/frame?id=css%e5%8f%98%e9%87%8f -->
		</view>
		<!--  -->
	</view>
</template>

<script>
	export default {
		props: {
			color: {
				type: String,
			},
			background: {
				type: String,
			}
		},
		name:"FatFatMeng-barHeight",
		data() {
			return {
				//状态栏
				barHeight: 25,
			};
		},
		onLoad:function(){
			////获取系统状态栏高度
			//_self = this;
			this.getSystemStatusBarHeight();
		},
		methods:{
			//获取系统状态栏高度
			getSystemStatusBarHeight: function() {
				var height = plus.navigator.getStatusbarHeight();
				this.barHeight = height;
				// #ifdef H5
				this.barHeight = 0;
				// #endif
			}
		}
	}
</script>

<style lang="scss" scoped>
    //状态栏颜色
	.status_bar {
		height: var(--status-bar-height);
		width: 750rpx;
		background-color: #FFFFFF;
		color: #333;
	}
</style>
